package com.fileshare.web.dao;

import com.fileshare.web.dao.base.SequenceGenerater;
import com.fileshare.web.entity.Comment;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public interface CommentRepository extends SequenceGenerater<Comment> {
    void createComment(Comment comment);

    @Override
    Comment findBySeq(String commentSeq);

    List<Comment> searchCommentByArticleSeq(@Param("referenceKey") String referenceKey, @Param("referenceType") String referenceType);

    List<Comment> searchCommentByArticleSeqAndToReference(@Param("articleSeq")String articleSeq,@Param("commentSeq") String commentSeq);
}
